<script>
$(function() {
	$( "#tabs" ).tabs({
	    select: function(event, ui) {
	        var url = $.data(ui.tab, 'load.tabs');
	        if( url ) {
	            location.href = url;
	            return false;
	        }
	        return true;
	    },
	selected: 0
	});
});
</script>
<div id="tabs">
	<ul>
    <li><a href='#cap'>Danh sách cấp KT - KL</a> </li>
    <li><?php echo $this->Html->link(__('Thêm mới', true), array('controller'=>'caps','action' => 'add')); ?></li>
	</ul>
<div class="caps index" id="cap">
	<h2><?php __('Các cấp khen thưởng - kỷ luật');?></h2>
	<table cellpadding="0" cellspacing="0" id="tables">
	<tr>
			<th><?php echo 'STT';?></th>
			<th><?php echo 'Tên cấp';?></th>
			<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
	$i = 0;
	foreach ($caps as $cap):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?>>
		<td><?php echo $i; ?>&nbsp;</td>
		<td><?php echo $cap['Cap']['tencap']; ?>&nbsp;</td>
		<td class="actions">
			<?php //echo $this->Html->link(__('View', true), array('action' => 'view', $cap['Cap']['id'])); ?>
			<?php echo $this->Html->link(__('Sửa', true), array('action' => 'edit', $cap['Cap']['id'])); ?>
			<?php echo $this->Html->link(__('Xóa', true), array('action' => 'delete', $cap['Cap']['id']), null, sprintf(__('Bạn muốn xóa cấp này ?', true), $cap['Cap']['id'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Trang %page%/%pages%, hiện có %count% mẫu tin', true)
	));
	?>	</p>

	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('Trước', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('Sau', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
</div>
</div>
</div>